<!-- 글 내용 보여주기 -->
<!--@if(!$module_info->document_title_format)-->
    {@ $module_info->document_title_format = 'h4'}
<!--@end-->

<div class="boardRead">
    <div class="originalContent">
        <div class="readHeader">
            <div class="titleAndUser">

                <div class="title">
                    <{$module_info->document_title_format}><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getTitle()}</a></{$module_info->document_title_format}>
                </div>

                <!--@if($module_info->display_author!='N')-->
                <div class="userInfo">
                    <!--@if(!$oDocument->getMemberSrl())-->
                        <div class="author">
                        <!--@if($oDocument->isExistsHomepage())-->
                            <a href="{$oDocument->getHomepageUrl()}" onclick="window.open(this.href);return false;">{$oDocument->getNickName()}</a>
                        <!--@else-->
                            {$oDocument->getNickName()}
                        <!--@end-->
                        </div>
                    <!--@else-->
                        <div class="author"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
                    <!--@end-->
                </div>
                <!--@end-->

                

            </div>

            <div class="dateAndCount">
                <div class="uri" title="{$lang->document_url}"><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getPermanentUrl()}</a></div>

                <div class="date" title="{$lang->regdate}">
                    <strong>{$oDocument->getRegdate('Y.m.d')}</strong> {$oDocument->getRegdate('H:i:s')} <!--@if($grant->manager || $module_info->display_ip_address!='N')-->({$oDocument->getIpaddress()})<!--@end-->
                </div>

                <div class="readedCount" title="{$lang->readed_count}">{$oDocument->get('readed_count')}</div>

                <!--@if($oDocument->get('voted_count')!=0 || $oDocument->get('blamed_count')!=0)-->
                <div class="votedCount" title="{$lang->voted_count}">
					<a href="#layer_voted_member" class="voted_member_{$oDocument->document_srl} document votedup">{$oDocument->get('voted_count')}</a> / <a href="#layer_voted_member" class="voted_member_{$oDocument->document_srl} document voteddown">{$oDocument->get('blamed_count')}</a>
                </div>
                <!--@end-->

                <div class="replyAndTrackback">
                    <!--@if($grant->write_comment && $oDocument->allowComment()) -->
                    <div class="replyCount"><a href="#comment" title="{$lang->comment}"><strong>{$oDocument->getCommentcount()}</strong></a></div>
                    <!--@end-->
                    <!--@if($oDocument->allowTrackback() && $oDocument->getTrackbackCount() )-->
                    <div class="trackbackCount"><a href="#trackback" title="{$lang->trackback}"><strong>{$oDocument->getTrackbackCount()}</strong></a></div>
                    <!--@end-->
                </div>

                <!--@if($module_info->use_category == "Y" && $oDocument->get('category_srl'))-->
                <div class="category" title="{$lang->category}"><a href="{getUrl('category',$oDocument->get('category_srl'), 'document_srl', '')}">{$category_list[$oDocument->get('category_srl')]->title}</a></div>
                <!--@end-->

                
            </div>

            
        </div>

        

        <!--@if($oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted()) )-->
        <table cellspacing="0" summary="" class="extraVarsList">
        <col width="150" />
        <col />
        <!--@foreach($oDocument->getExtraVars() as $key => $val)-->
        <tr>
            <th>{$val->name}</th>
            <td>{$val->getValueHTML()}</td>
        </tr>
        <!--@end-->
        </table>
        <!--@end-->

        <div class="readBody">
            <div class="contentBody">

                <!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
                    <div class="secretContent">
                        <form action="./" method="get" onsubmit="return procFilter(this, input_password)">
                        <input type="hidden" name="mid" value="{$mid}" />
                        <input type="hidden" name="page" value="{$page}" />
                        <input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />

                            <div class="title">{$lang->msg_is_secret}</div>
                            <div class="content"><input type="password" name="password" id="cpw" class="iText" /><span class="btn"><input type="submit" value="{$lang->cmd_input}" /></span></div>

                        </form>
                    </div>
                <!--@else-->
                    {$oDocument->getContent()}
                <!--@end-->

                <!-- 서명 / 프로필 이미지 출력 -->
                <!--@if($module_info->display_sign != 'N' && ($oDocument->getProfileImage() || $oDocument->getSignature()))-->
                    <div class="memberSignature">
                    <!--@if($oDocument->getProfileImage())-->
                        <div class="profile"><img src="{$oDocument->getProfileImage()}" alt="profile" /></div>
                    <!--@end-->
                    <!--@if($oDocument->getSignature())-->
                        <div class="signature">{$oDocument->getSignature()}</div>
                    <!--@end-->
                        
                    </div>
                <!--@end-->
            </div>
        </div>

        {@ $tag_list = $oDocument->get('tag_list') }
        <!--@if(count($tag_list))-->
        <div class="tag">
            <ul>
                <!--@for($i=0;$i<count($tag_list);$i++)-->
                    {@ $tag = $tag_list[$i]; }
                    <li><a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" rel="tag">{htmlspecialchars($tag)}</a><!--@if($i<count($tag_list)-1)-->,&nbsp;<!--@end--></li>
                <!--@end-->
            </ul>
        </div>
        <!--@end-->

        <!--@if($oDocument->hasUploadedFiles())-->
        <div class="fileAttached">
            {@ $uploaded_list = $oDocument->getUploadedFiles() }
            <ul>
                <!--@foreach($uploaded_list as $key => $file)-->
                <li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} ({FileHandler::filesize($file->file_size)})({number_format($file->download_count)})</a></li>
                <!--@end-->
            </ul>
            
        </div>
        <!--@end-->
    </div>

    <!-- 목록, 수정/삭제 버튼 -->
    <div class="btnArea">
        <!--@if($module_info->default_style != 'blog' || ($module_info->default_style == 'blog' && Context::get('document_srl')))-->
        <span class="btn"><a href="{getUrl('document_srl','')}"><!--@if($module_info->default_style != 'blog')-->{$lang->cmd_list}<!--@else-->{$lang->cmd_view_all}<!--@end--></a></span>
        <!--@end-->
        <!--@if($oDocument->isEditable())-->
        <span class="btn"><a href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}">{$lang->cmd_modify}...</a></span>
        <span class="btn"><a href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}">{$lang->cmd_delete}</a></span>
        <!--@end-->
    </div>

</div>

<!-- 엮인글 -->
<!--@if($oDocument->allowTrackback())-->
    <!--#include("./trackback.html")-->
<!--@end-->

<!-- 댓글 -->
<a name="comment"></a>
<!--#include("./comment.html")-->

<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
    <form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="boardEditor" >
    <input type="hidden" name="mid" value="{$mid}" />
    <input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
    <input type="hidden" name="comment_srl" value="" />
    <input type="hidden" name="content" value="" />
        <div class="boardWrite commentEditor">
            <div class="userNameAndPw">
                <!--@if(!$is_logged)-->
                <label for="userName">{$lang->writer}</label>
                <input type="text" name="nick_name" value="" class="userName iText" id="userName"/>

                <label for="userPw">{$lang->password}</label>
                <input type="password" name="password" value="" id="userPw" class="userPw iText" />

                <label for="emailAddress">{$lang->email_address}</label>
                <input type="text" name="email_address" value="" id="emailAddress" class="emailAddress iText"/>

                <label for="homePage">{$lang->homepage}</label>
                <input type="text" name="homepage" value="" id="homePage" class="homePage iText"/>
                <!--@else-->
                <input type="checkbox" name="notify_message" value="Y" id="notify_message" />
                <label for="notify_message">{$lang->notify}</label>
                <!--@end-->
                <!--@if($module_info->secret=="Y")-->
                <input type="checkbox" name="is_secret" value="Y" id="is_secret" />
                <label for="is_secret">{$lang->secret}</label>
                <!--@end-->
            </div>

            <div class="editor">{$oDocument->getCommentEditor()}</div>
        </div>

        <div class="btnArea">
            <span class="btn"><input type="submit" value="{$lang->cmd_comment_registration}" /></span>
        </div>
    </form>
<!--@end-->
